import { FriendModel } from "../../models/friend.js";
import Dialog from '../../miniprogram_npm/vant-weapp/dialog/dialog';
var _FriendModel = new FriendModel();
var _self;
Page({
  data: {
    recommendList:[]
  },
  onLoad: function (options) {
    _self = this;
    _FriendModel.getRecommendFriends(function (data) {
       _self.setData({
         recommendList:data
       })
       console.log(data)
    })
  },
  addFriend:function(e){
    _FriendModel.addFriend(e.detail.uid, function (data) {
      Dialog.alert({
        message: "成功发送添加好友请求。"
      });
      return;
    })
  },
  onReady: function () {

  }
})